const express = require('express')
const router = express.Router()
const expressJoi = require('@escook/express-joi')
const {update_volunteerinfo_schema,
       update_password_schema,
       update_avatar_schema
       } = require('../schema/volunteer')


// 挂载路由
// 导入路由函数处理模块
const volinfo_handler = require('../router_handler/volunteerinfo')
// 获取用户基本信息
router.get('/volinfo',volinfo_handler.getVolInfo)
// 更新用户基本信息
router.post('/updateinfo/volinfo',volinfo_handler.updateVolInfo)
// 重置密码的接口
router.post('/updatepwd/volpwd',expressJoi(update_password_schema),volinfo_handler.updatePassword)
// 更新头像
router.post('/update/volavatar',expressJoi(update_avatar_schema),volinfo_handler.updateAvatar)
router.get('/volexapase/:userId',volinfo_handler.goTeamByExa)


module.exports = router